package com.newer.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@ApiModel(value="com-newer-domain-Material")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "t_material")
public class Material {
    @TableId(value = "materialId", type = IdType.AUTO)
    @ApiModelProperty(value="")
    private Integer materialid;

    @TableField(value = "categoryId")
    @ApiModelProperty(value="")
    private Integer categoryid;

    @TableField(value = "materialName")
    @ApiModelProperty(value="")
    private String materialname;

    @TableField(value = "supplierId")
    @ApiModelProperty(value="")
    private Integer supplierid;

    @TableField(value = "standard")
    @ApiModelProperty(value="")
    private String standard;

    @TableField(value = "unit")
    @ApiModelProperty(value="")
    private String unit;

    @TableField(value = "imgName")
    @ApiModelProperty(value="")
    private String imgname;

    @TableField(value = "price")
    @ApiModelProperty(value="")
    private Double price;

    @TableField(value = "weight")
    @ApiModelProperty(value="")
    private Integer weight;

    //产品类型
    @TableField(exist = false)
    private MaterialCategory materialCategory;

    //供应商
    @TableField(exist = false)
    private Supplier supplier;
}